
package com.rasenhund.android.paintstock.schema;

import java.io.Serializable;

public class Stock implements Serializable {

    private static final long serialVersionUID = 1L;

    int _id;
    int paintId;
    int stock;
    int amount;

    // String paintName;

    Paint paint = null; // 塗料情報

    public Stock() {
        paint = new Paint();
    }

    // テーブル名
    public static final String TABLE_NAME = "Stock";

    // カラム名
    public class Columns {

        public static final String ROW_ID = "_id";
        public static final String PAINT_ID = "paintId";
        public static final String Stock = "stock";
        public static final String Amount = "amount";

    }

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public int getPaintId() {
        return paintId;
    }

    public void setPaintId(int paintId) {
        this.paintId = paintId;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public Paint getPaint() {
        return paint;
    }

    public void setPaint(Paint paint) {
        // 上書きではなくコピー
        // this.paint = paint;
        this.paint.set_id(paint.get_id());
        this.paint.setSeriesId(paint.getSeriesId());
        this.paint.setName(paint.getName());
        this.paint.setSort(paint.getSort());
        this.paint.setColor(paint.getColor());
    }

    // public String getPaintName() {
    // return paintName;
    // }
    //
    // public void setPaintName(String paintName) {
    // this.paintName = paintName;
    // }


}
